<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%-- <input id="curPage" style="display: none;" value="${param.curPage}"> --%>
<div class="order_btn">
	<div class="btn_service">
		<a href="../../index.jsp?toPage=1">
			<img src="../../images/order/service_0.png">
		</a>
	</div> 
	<div class="btn_completed">
		<a href="javascript:void(0)">
			<img src="../../images/order/completed_1.png">
		</a>
	</div> 
</div>
<c:if test="${requestScope.completeTradeList.size()==0}">
	<div id="order">
		<div class="order_no_order">
			<img src='../../images/order/no_order_03.png'>
		</div>
		<div>
			<font color="#323232">您还没有相关的订单！</font>
		</div>
		<div class="order_to_order">
			<a href="../../index.jsp">
				<img src='../../images/order/no_order_07.png'>
			</a>
		</div>
	</div>
</c:if>
<c:if test="${requestScope.flag=='complete'}">
	<c:forEach var="complete" items="${requestScope.completeTradeList}" varStatus="status">
		<div class="order_completed">
			<%-- <div class="order_id">${status.count}</div> --%>
			<div class="order_completed_content">
				<div>
					<div class="order_completed_title"><p>订&nbsp;&nbsp;单&nbsp;&nbsp;号:</p></div>
					<div class="order_completed_data"><p>${complete.orderNum}</p></div>
				</div>
				<div>
					<div class="order_completed_title"><p>完成时间:</p></div>
					<div class="order_completed_data"><p style="color: #787878"><fmt:formatDate value="${complete.endTime}" pattern="yy-MM-dd HH:mm:ss"/></p></div>
				</div>
				<div>
					<div class="order_completed_title"><p>订单明细:</p></div>
					<div class="order_completed_data"><p>共<font color="#ffc60d">${complete.totalNum}</font>件&nbsp;&nbsp;总计:<font color="#ffc60d">${complete.paymentPrice}</font>元</p></div>
				</div>
			</div>
			<div class="order_completed_btn">
				<span></span>
				<a href="javascript:void(0)" id="details" onclick="details('${complete.orderNum}')">
					<img src="../../images/order/detail_service.png">
				</a>
			</div>
		</div>
	</c:forEach>
</c:if>
<c:if test="${requestScope.flag=='detail'}">
	<c:forEach var="complete" items="${requestScope.completeTradeList}" varStatus="status">
		<c:if test="${complete.orderNum==requestScope.orderNum}">
			<div class='order_table'>
				<table border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td class="order_td_title">订&nbsp;&nbsp;单&nbsp;&nbsp;号:</td>
						<td class="order_td_content">${complete.orderNum}</td>
						<td class="order_td_btn">
						</td>
					</tr>
					<tr>
						<td class="order_td_title">下单时间:</td>
						<td class="order_td_content"><fmt:formatDate value="${complete.startTime}" pattern="yy-MM-dd HH:mm:ss"/></td>
						<td class="order_td_btn">
						</td>
					</tr>
					<tr>
						<td class="order_td_title">完成时间:</td>
						<td class="order_td_content"><fmt:formatDate value="${complete.endTime}" pattern="yy-MM-dd HH:mm:ss"/></td>
						<td class="order_td_btn">
						</td>
					</tr>
					<tr>
						<td class="order_td_title">订单状态:</td>
						<td class="order_td_content">
						<c:if test="${complete.status==0}">用户下单成功</c:if>
						<c:if test="${complete.status==1}">等待上门收衣</c:if>
						<c:if test="${complete.status==2}">送往工厂清洗</c:if>
						<c:if test="${complete.status==3}">衣物清洗完成</c:if>
						<c:if test="${complete.status==4}">等待送衣上门</c:if>
						<c:if test="${complete.status==5}">用户订单完成</c:if>
						<c:if test="${complete.status==6}">用户取消订单</c:if>
						</td>
						<td class="order_td_btn">
							<a href="javascript:void(0)" id='track'>
							<img src="<%=path%>/images/order/process_tracking.png">
							</a>
						</td>
					</tr>
					<tr>
						<td class="order_td_title">送衣方式:</td>
						<td class="order_td_content">
						<c:if test="${complete.sendAndReceiveType==0}">人工收送</c:if>
						<c:if test="${complete.sendAndReceiveType==1}">柜子收，人工送</c:if>
						<c:if test="${complete.sendAndReceiveType==2}">人工收，柜子送</c:if>
						<c:if test="${complete.sendAndReceiveType==3}">柜子收送</c:if>
						</td>
						<td class="order_td_btn">
						</td>
					</tr>
					<tr>
						<td class="order_td_title">洗衣明细:</td>
						<td class="order_td_content">共<font color="#ff6c0d">${complete.totalNum}</font>件<font color="#ff6c0d">
						<c:if test="${complete.check==0}">（未审核）</c:if>
						<c:if test="${complete.check==1}">（已审核）</c:if>
						</font></td>
						<td class="order_td_btn">
							<a href="javascript:void(0)" id="ydetail">
							<img src="<%=path%>/images/order/show_order.png">
							</a>
						</td>
					</tr>
					<tr>
						<td class="order_td_title">收费情况:</td>
						<td class="order_td_content" colspan="2">
						<c:if test="${complete.payment==0}">未支付（共</c:if>
						<c:if test="${complete.payment==1}">已支付（共</c:if>
						<font color="#ff6c0d">${complete.paymentPrice}</font>
						元）</td>
						<!-- <td class="order_td_btn">
						</td> -->
					</tr>
					<tr>
						<td class="order_td_title">留&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;言:</td>
						<td colspan="2" class="order_td2_content">${complete.comment}</td>
					</tr>
				</table>
			</div>
		</c:if>
	</c:forEach>
</c:if>
